﻿/*针对有楼盘展示及有显示隐藏效果*/
//房源查询房间及销控表列表
var gListOver = null;
function house_outListTr(obj){
	if(obj != gListOver){
		obj.className = "td_listTable_record_off";
	}
}
function house_clickListTr(obj){
	if(gListOver == null){
		obj.className = "td_listTable_record_on";
	} else {
		if (gListOver != obj) {
			gListOver.className = "td_listTable_record_off";
			obj.className = "td_listTable_record_on";
		}
	}
	gListOver = obj;
}

// 竖条显示隐藏右边效果
function hide_display(t_id,i_id){//显示隐藏程序
	var t_id;//表格ID
	var i_id;//图片ID
	var on_img="images/arrowRight.gif";//打开时图片
	var off_img="images/arrowLeft.gif";//隐藏时图片
	if (t_id.style.display == "none") {//如果为隐藏状态
	t_id.style.display="";//切换为显示状态
	i_id.src=on_img;}//换图
	else{//否则
	t_id.style.display="none";//切换为隐藏状态
	i_id.src=off_img;}//换图
}

function img_show(thw){
	cells = document.getElementsByName(thw);
	for(j = 0; j < cells.length; j++) cells[j].style.visibility = 'visible';
}
function img_hidden(thw){
	cells = document.getElementsByName(thw);
	for(j = 0; j < cells.length; j++) cells[j].style.visibility = 'hidden';
}


//户型图选择主Tab显示开始
var old=1;

function house_setSeq(i){
	old=i
}
function house_setBackgroud(i){
	var old_td11="tab_"+old+"1";
	var old_td21="tab_"+old+"2";
	var old_td31="tab_"+old+"3";
	eval("document.all."+old_td11).className="tab_offLeftBg";
	eval("document.all."+old_td21).className="tab_offBg";
	eval("document.all."+old_td31).className="tab_offRightBg";
	var new_td11="tab_"+i+"1";
	var new_td21="tab_"+i+"2";
	var new_td31="tab_"+i+"3";
	eval("document.all."+new_td11).className="tab_onLeftBg";
	eval("document.all."+new_td21).className="tab_onBg";
	eval("document.all."+new_td31).className="tab_onRightBg";
	house_ShowTable(i);
}
function house_ShowTable(i)
{
document.all("tab_subMenu"+old).style.display="none"
document.all("tab_subMenu"+i).style.display="block"

}

//户型图Tab二级显示开始
function house_switchTag(tag)
{
	document.getElementById("ifra_right").style.display="block";
	//alert(tag);
	for(i=1; i <5; i++)
	{
		if ("tag_sec"+i==tag)
		{
			document.getElementById(tag).getElementsByTagName("a")[0].className="tab_offSub";
			document.getElementById(tag).getElementsByTagName("a")[0].className="tab_onSub";
		}else{
			document.getElementById("tag_sec"+i).getElementsByTagName("a")[0].className="";
			document.getElementById("tag_sec"+i).getElementsByTagName("a")[0].className="";
		}
	}

}

//显示右边内容
function show_hide_right(img)
{
	document.getElementById("ifra_right").style.display="block";
}

//------------------装修管理----------
function checkboxYN(ID1,ID2)
{
	if(document.getElementById(ID1).checked)
	{
		document.getElementById(ID2).style.display="";
	}else{
		document.getElementById(ID2).style.display="none";
	}
}

//按钮 add by alvin 2008-12-22
var old=1;
function btn_change1(i){
	old=i
}
function btn_change_over1(i){
	var new_td11="btn1_"+i+"1";
	var new_td21="btn1_"+i+"2";
	var new_td31="btn1_"+i+"3";
	eval("document.all."+new_td11).className="buttonOnLeft1";
	eval("document.all."+new_td21).className="buttonOnMiddle1";
	eval("document.all."+new_td31).className="buttonOnRight1";
 }
function btn_change_out1(i){
	var new_td11="btn1_"+i+"1";
	var new_td21="btn1_"+i+"2";
	var new_td31="btn1_"+i+"3";
	eval("document.all."+new_td11).className="buttonOffLeft1";
	eval("document.all."+new_td21).className="buttonOffMiddle1";
	eval("document.all."+new_td31).className="buttonOffRight1";
 }
 //modify by alvin 2008-12-26
 function butDetail(i,j){
	 for(l=1;l<=j;l++){
		var but_Detail2="butDetail"+l;
		eval("document.all."+but_Detail2).className="flowImg2";
	 }
 	if(i!="0"){
		var but_Detail="butDetail"+i;
		eval("document.all."+but_Detail).className="flowImg";
	}
 }

  function butDetail2(i,j){
	 for(l=1;l<=j;l++){
		var but_Detail2="butDetail"+l;
		eval("document.all."+but_Detail2).className="flowImg4";
	 }
 	if(i!="0"){
		var but_Detail="butDetail"+i;
		eval("document.all."+but_Detail).className="flowImg3";
	}
 }

